yjx.controller('myBrakerageController',['$rootScope','$scope','$fetch','modalService','$timeout',function ($rootScope,$scope,$fetch,modalService,$timeout) {
    var myBrokerages = '/brokerage/list';

    /*获取列表 区分于翻页的情况*/
    $scope.noBrokerageMsg = "您本月还没有获得健康管理费，要加油哦";
    function getMyBrokerages() {
        $fetch.fetch(
            myBrokerages,
            {
                params:{
                    userId:$rootScope.userId,
                    type:1
                },
                cache:false
            }
        ).then(function (data) {
                $timeout(function(){
                    if(data && data.brokerages)
                        $scope.myBrokerages = data.brokerages;
                })
        }).catch(function (e) {
                modalService.mainMsgError(e.msg);
        })
    }
    if($rootScope.userId){
        getMyBrokerages();
    }

}])